﻿using System;

namespace Borg
{
    [Serializable]
    public class TagDefinition : Qualifiable
    {
        private SlotDefinition _slotDefinition;

        public SlotDefinition SlotDefinition
        {
            get { return _slotDefinition; }
            internal set { _slotDefinition = value; }
        }

        public override bool IsQualified
        {
            get { return Qualifier.IsQualified(this); }
        }

        public TagDefinition(int id, string name)
            : base(id, name)
        { }

        public override bool Qualify()
        {
            return Qualifier.Qualify(this);
        }

        internal override AssemblyElement GetAssemblyElement()
        {
            return SlotDefinition.Contract;
        }
    }
}
